package bmatch.tech.file.resource;

import bmatch.tech.file.model.Files;
import bmatch.tech.file.model.MyDirectory;
import bmatch.tech.file.model.MyFile;
import bmatch.tech.file.model.Response;
import bmatch.tech.file.service.CloudService;
import bmatch.tech.file.service.impl.CloudServiceImpl;
import bmatch.tech.file.util.DataStore;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

/**
 * 云服务
 *
 * @author: Awake
 * @date: 2018-11-30 22:09
 **/
@Path("/")
public class CloudResource {

    private static CloudService service;

    static {
        service = new CloudServiceImpl();
    }

    @GET
    @Path("display")
    @Produces(MediaType.APPLICATION_JSON)
    public Response displayAll(
            @QueryParam("userId") String userId,
            @QueryParam("path") String path) {

        Response response = service.display(userId, path);
        return response;
    }
}

